// 纯函数和不纯的函数
// slice / splice
let array = [1, 2, 3, 4, 5]
let str = 'asdgfjkgfjkcvnmcvncvnm.'

console.log(array.slice(0, 3))
console.log(array.slice(0, 3))
console.log(array.slice(0, 3))

console.log(array.splice(0, 3))
console.log(array.splice(0, 3))
console.log(array.splice(0, 3))